home *** CD-ROM | disk | FTP | other *** search
- #!/usr/local/bin/perl5
- #
- # mkaccess.pl: make an access file
- #
- # Copyright (C) 1994, Afzal Ballim
- #
- # Last Modified: Thu Jan 19 09:04:05 MET 1995
- # arguments: 1st is access file name
- # 2nd is password file name
- # 3rd is group file name
- # if there's a 4th argument, that indicates that
- # webforum should also be put into the group
-
- $i=@ARGV[0];
- $pf=@ARGV[1];
- $gf=@ARGV[2];
- if ($#ARGV=3 && @ARGV[3] eq "all") {
- $WF='all';
- } else {
- $WF='master';
- }
-
- open(F,">$i") || die "Couldn't make $i\n";
- print F <<EOM;
- AuthUserFile $pf
- AuthGroupFile $gf
- AuthName WebForum
- AuthType Basic
- EOM
-
- if ($WF eq 'all') {
- print F <<EOM1;
- <Limit POST>
- require group webmasters
- require group webforum
- </Limit>
- <Limit GET>
- require group webmasters
- require group webforum
- </Limit>
- EOM1
- } else {
- print F <<EOM2;
- <Limit POST>
- require group webmasters
- </Limit>
- <Limit GET>
- require group webmasters
- </Limit>
- EOM2
- }
-